home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-03 / qbwiz13.zip / SOURCE.ZIP / CRT.ASM < prev    next >
Assembly Source File  |  1992-07-14  |  2KB  |  54 lines

  1. comment #
  2.  
  3.    +----------------------------------------------------------------------+
  4.    |                                                                      |
  5.    |         QBWiz  Copyright (c) 1990-1992  Thomas G. Hanlin III         |
  6.    |                                                                      |
  7.    |                       QuickBasic Access Library                      |
  8.    |                                                                      |
  9.    +----------------------------------------------------------------------+
  10.  
  11. #
  12.  
  13. public  CRT
  14.  
  15.  
  16. .model medium
  17.  
  18. .code
  19.  
  20.  
  21.  
  22. CRT           proc                     ; get display adapter type
  23.               mov            al,b$Adapter   ;
  24.               test           al,1           ; MDA?
  25.               jnz            MDA            ;   yep, set it
  26.               test           al,2           ; CGA?
  27.               jnz            CGA            ;   yep, set it
  28.               test           al,4           ; EGA?
  29.               jnz            EGA            ;   yep, set it
  30. VGA:          mov            ax,"GV"        ;
  31. Done:         mov word ptr   String,ax      ; save first char
  32.               mov            ax,offset DGROUP:Str ; point to string header
  33.               ret                           ;
  34. MDA:          mov            ax,"DM"        ;
  35.               jmp            Done           ;
  36. CGA:          mov            ax,"GC"        ;
  37.               jmp            Done           ;
  38. EGA:          mov            ax,"GE"        ;
  39.               jmp            Done           ;
  40. CRT           endp                     ; get display adapter type
  41.  
  42.  
  43.  
  44. .data
  45.  
  46. extrn     b$Adapter: byte
  47.  
  48. Str      dw 3,offset DGROUP:String
  49. String   db "MDA"
  50.  
  51.  
  52.  
  53.               end
  54.